﻿CREATE TABLE [dim].[LegalEntity] (
    [LegalEntityUId]              INT          NOT NULL,
    [ParentLegalEntityUId]        INT          NULL,
    [LegalEntityOrderBy]          BIGINT       NULL,
    [LegalEntityId]               INT          NULL,
    [LegalEntityUniqueCode]       CHAR (7)     NULL,
    [LegalEntityCode]             VARCHAR (5)  NULL,
    [LegalEntityName]             VARCHAR (50) NULL,
    [LegalEntityMappingStartDate] DATE         NULL,
    [LegalEntityMappingEndDate]   DATE         NULL,
    PRIMARY KEY CLUSTERED ([LegalEntityUId] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF)
);

